<!-- <%@ page contentType="text/html;charset=UTF-8" language="java" %> -->
<!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>管理系统管理者添加帮手</title>

    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <link href="https://cdn.bootcss.com/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker-standalone.css" rel="stylesheet">
    <style type="text/css">
        td{
            height: 51px !important;
        }
    </style>

</head>
<body style="background-color:#EEEEEE;">
    <div style="padding: 20px;">
        <div class="container-fluid">
            <div class="row">
                <h1 style="text-align:center;color: #5BA9B8">能力规范文稿管理系统</h1>
                <div class="col-md-12">
                    <p th:text="'你好('+${name}+')'" class="pull-left" style="font-size: 15px"></p>
                    <a th:href="@{/logout}+ '?token=' + *{token}" role="button" class="btn btn-danger pull-right" style="margin-bottom:10px;">注销</a>
                    </p>
                </div>
                <div class="row">
                    <div class="col-md-3" >
                        <div style="background-color:#FFF;height: 700px;">
                            <div class="list-group">
                                <a href="#" class="list-group-item active">
                                    管理者
                                </a>
                                <a th:href="@{/admin/home}+ '?token=' + *{token}" class="list-group-item">主页</a>
                                <a th:href="@{/admin/proposal/search}+ '?token=' + *{token}" class="list-group-item" >提案列表</a>
                                <a th:href="@{/admin/proposal/create}+ '?token=' + *{token}" class="list-group-item">提案编制</a>
                                <a th:href="@{/admin/recommend/create}+ '?token=' + *{token}" class="list-group-item">推荐会员</a>
                                <a th:href="@{/admin/standard/create}+ '?token=' + *{token}" class="list-group-item">规范编制</a>
                                <a th:href="@{/admin/standard/pass}+ '?token=' + *{token}" class="list-group-item" >平台规范</a>
                                <a th:href="@{/admin/pass}+ '?token=' + *{token}" class="list-group-item">会员审批</a>
                                <a th:href="@{/admin/proposal/pass}+ '?token=' + *{token}" class="list-group-item" >提案审批</a>
                                <a th:href="@{/admin/standard/pass}+ '?token=' + *{token}" class="list-group-item" >规范审批</a>
                                <!--分发权限-->
                                <a th:href="@{/admin/helper/add}+ '?token=' + *{token}" class="list-group-item" style="background-color: #ddd">添加帮手</a>
                                <a th:href="@{/admin/edit}+ '?token=' + *{token}" class="list-group-item">信息维护</a>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-9">
                        <div style="background-color:#FFF;  height: 600px;">
                            <div style="background-color:#fff; padding:20px;">
                                <div>
                                    <p style="font-size: 25px;font-weight: 600;">添加助手</p>
                                </div>
                                <hr>
                                <form th:action="@{/admin/helper/search}+ '?token=' + *{token}" method="post" class="form-inline">
                                  <div class="form-group">
                                    <div class="row">
                                        <div class="col-md-4">
                                             <div class="input-group ">
                                                  <label class="sr-only glyphicon glyphicon-search" for="id"></label>
                                                  <input type="number" class="form-control" name="phone" id="id" placeholder="请输入手机号码">
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                             <div class="input-group ">
                                                <label class="sr-only glyphicon glyphicon-search" for="NameAuthor"></label>
                                                <input type="text" class="form-control" name="name" id="NameAuthor" placeholder="请输入姓名">
                                            </div>
                                        </div> 
                                        <div class="col-md-4">
                                            <input  type="submit" class="btn btn-primary" value = "点击搜索">
                                        </div>  
                                    </div>
                                    <br>
                                  </div>
                                </form>
                                
                                <div class="row">
                                    <div class="col-md-12" style="font-size: 15px">
                                        <table class="table table-hover">
                                            <tr> 
                                                <th >管理者姓名</th>
                                                <th >手机号</th>  
                                                <th >权限</th>
                                                <th >分发权限</th>
                                                <th >查看详细信息</th>
                                                <th >确定更改</th>
                                            </tr>
                                            <tr th:each="user,iterStat : ${users}" >
                                            <form th:action="@{/admin/helper/pass} +  '?token=' + *{token}" method="post">
                                                <td th:text="${user.name}" ></td>
                                                <td th:text="${user.phone}" ></td>
                                                <div th:switch="${user.adminstatus}">
                                                    <td th:case="0">会员</td>
                                                    <td th:case="1">推荐</td>
                                                    <td th:case="2">备案</td>
                                                </div>
                                                <input name="ids" th:value="${user.id}" hidden>
                                                <td>
                                                    <div th:switch="${level[iterStat.index]}">
                                                        <div th:case="1"> <select name="status" style="width:80px;" id="" >
                                                            <option th:value="1">推荐</option>
                                                        </select></div>
                                                        <div th:case="2"> <select name="status" style="width:80px;" id="" >
                                                            <option th:value="1">推荐</option>
                                                            <option th:value="2">备案</option>
                                                        </select></div>
                                                        <div th:case="3"> <select name="status" style="width:80px;" id="" >
                                                            <option th:value="1">推荐</option>
                                                            <option th:value="2">备案</option>
                                                            <option th:value="3">立案</option>
                                                        </select></div>
                                                        <div th:case="4"> <select  name="status" style="width:80px;margin-left: ;" id="" >
                                                            <option th:value="2">备案</option>
                                                        </select></div>
                                                        <div th:case="5"> <select  name="status" style="width:80px;margin-left: ;" id="" >
                                                            <option th:value="2">备案</option>
                                                            <option th:value="3">立案</option>
                                                        </select></div>
                                                        <div th:case="6"> <select  name="status" style="width:80px;margin-left: ;" id="" >
                                                            <option th:value="3">立案</option>
                                                        </select></div>
                                                    </div>
                                                </td>
                                                <td ><a th:href="@{/admin/helper/read} + '?id=' + ${user.id}+ '&token=' + *{token}" role="button" class="btn btn-primary"  name="check" id="check" style="font-size: 13px">查看</a>
                                                </td>
                                                <td><input type="submit" id="id" name="" class="btn btn-primary" value="确定" style="font-size: 13px">
                                                </td>
                                            </tr>
                                            </form>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</body>
</html>